﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/FacebookApp/Views/Shared/AppTab.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="FaceSharp.MVC.Code.Facebook" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	PageTab
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>PageTab</h2>
<p>Facebook posts a handful of information to Page Tabs. This page displays the parsed information Facebook is posting, note the difference between when you like the Fan Page and when you don't, this is commonly used for <em>Like Gating</em> your Page Tab.</p>
<br />
    <% if(Model.Page != null && Model.Page.Liked == false){ %>
    <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.facebook.com/apps/application.php?id=<% =new FacebookCore().ApplicationId %>" show_faces="true" width="450" font=""></fb:like>
    
    <% } else {%>
    Thank you for liking us! Don't forget to Like FaceSharp too!<br />
     <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.facebook.com/facesharp" show_faces="true" width="450" font=""></fb:like>
    
    <% } %>
    <br />
    <br />
    <h3>Data Facebook posted to page:</h3>

    Algorithm : <% = Model.Algorithm %> <br />
    Expires : <% = Model.Expires ?? 0 %> ( 0 = null ) <br /> 
    IssuedAt : <% = Model.IssuedAt ?? 0 %> ( 0 = null ) <br />
    OAuthToken : <% = Model.OAuthToken %> <br />
    AppData : <% = Model.AppData ?? "Not Available" %> <br />
    <b>Page:</b><br />
    <% if(Model.Page != null) { %>
    Page.Id : <% = Model.Page.Id %> <br />
    <b>Page.Liked</b> : <% = Model.Page.Liked %> <br />
    Page.Admin : <% = Model.Page.Admin %> <br />
    <% } %>
    <b>User:</b><br />
    <% if(Model.User != null) { %>
    User.Country : <% = Model.User.Country %> <br />
    User.Locale : <% = Model.User.Locale %> <br />
    <b>User.Age:</b><br />
    <% if(Model.User.Age != null && Model.User.Age.Min != null) { %>
    User.Age.Min : <% = Model.User.Age.Min %> <br />
    <% } %>
    <% } %>
    UserId : <% = Model.UserId ?? 0 %> ( 0 = null ) <br />


    <hr noshade />
    <h3>Like Button : XFBML - Like FaceSharp Fan Page</h3><br />
    <fb:like href="http://www.facebook.com/facesharp" show_faces="true" width="450" font=""></fb:like>
    <br /><br />

    <h3>Like Button : XFBML - Like current page</h3><br />
    <fb:like href="<% =new FacebookCore().ApplicationUrl %>" show_faces="true" width="450" font=""></fb:like>
    <br /><br />

    <h3>Like Button : XFBML - Like app page</h3><br />
    <fb:like href="http://www.facebook.com/apps/application.php?id=<% =new FacebookCore().ApplicationId %>" show_faces="true" width="450" font=""></fb:like>
    <br /><br />

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="PageBottomContent" runat="server">
</asp:Content>
